<?php
/**
 * Wraps and outputs a JSON response
 */
class JsonWrapper extends Wrapper {
	/**
	 * No extra headers needed.
	 * 
	 * (non-PHPdoc)
	 * @see Wrapper::setHeaders()
	 */
	public function setHeaders() {
		// no extra headers to set
	}
	
	/**
	 * Displays response in json-encoded format.
	 * 
	 * (non-PHPdoc)
	 * @see Wrapper::setResponse()
	 */
	public function setResponse() {
		echo json_encode(Servlet::$models->toArray());
	}
}